<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>登录</title>
</head>
<body>
<h2>标准登录页面</h2>
<h3>表单登录</h3>
<!--spring security 默认处理用户名密码就是/login，可以自定义，需要loginProcessingUrl()-->
<p style="color: red" th:if="${param.error}">用户名或密码错误</p>
<form action="/authentication/form" method="post">
    <table>
        <tr>
            <td>用户名:</td>
            <td>
                <label><input type="text" name="username"/></label>
            </td>
        </tr>
        <tr>
            <td>密码:</td>
            <td>
                <label><input type="password" name="password"/></label>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <button type="submit">登录</button>
            </td>
        </tr>
    </table>
</form>

<h3>短信登录</h3>
<form action="/authentication/mobile" method="post">
    <table>
        <tr>
            <td>手机号:</td>
            <td><label>
                <input type="text" name="mobile" value="18377330721"/>
            </label></td>
        </tr>
        <tr>
            <td>短信验证码:</td>
            <td>
                <label>
                    <input type="text" name="smsCode"/>
                </label>
                <a href="/code/sms?mobile=18377330721">发送验证码</a>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <button type="submit">登录</button>
            </td>
        </tr>

    </table>
</form>


<h3>社交登录</h3>
<!--qq为providerID-->
<a href="/qqLogin/callback.do">QQ登录</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="/qqLogin/weixin">微信登录</a>
</body>
</html>